package s2elinshu;

import java.util.Scanner;

public class J09Account {
	public static void main(String[] args) {
		String aid[] = new String[2];
		int balance[] = new int[2];
		double interestRate[] = new double[2];
		double getMonthlyInterestRate[] = new double[2];
		String dateCreated[] = new String[2];
		int withDraw[] = new int[2];
		int deposit[] = new int[2];
		
		account(aid, balance, interestRate, dateCreated, withDraw, deposit);
		getMonthlyInterestRate(interestRate, getMonthlyInterestRate);
		withDraw01(balance, withDraw);
		deposit01(balance, deposit);

		System.out.println("계좌번호는" + aid[1] );
		System.out.println("통장개설일은" + dateCreated[1] );
		System.out.println("통장잔액은" + balance[1] );
		System.out.println("연이율은" + interestRate[1] );
		System.out.println("월이율은" + getMonthlyInterestRate[1] );
		System.out.println("인출액은" + withDraw[1] );
		System.out.println("입금액은" + deposit[1] );
	
	}   // main 닫음
	public static void account(String aid[] , int balance[], double  interestRate[], String  dateCreated[], 
			int  withDraw[], int  deposit[]){
		Scanner sc = null;
		sc = new Scanner(System.in);
		System.out.println("계좌번호 입력");
        aid[1] = sc.next();
		System.out.println("통장잔액 입력");
		balance[1]  = sc.nextInt();
		System.out.println("이자율 입력");
		interestRate[1]  = sc.nextDouble();
		System.out.println("통장개설일입력");
		dateCreated[1]  = sc.next();
		System.out.println("인출금액입력");
		withDraw[1]  = sc.nextInt();
		System.out.println("입금금액입력");
		deposit[1] = sc.nextInt();
		sc.close();
	}
	public static void getMonthlyInterestRate(double  interestRate[],double  getMonthlyInterestRate[]){
		getMonthlyInterestRate[1]  = interestRate[1] /12;
	}
	public static void withDraw01(int  balance[],int  withDraw[]){
		balance[1]  = balance[1] -withDraw[1] ;
	}
	public static void deposit01(int balance[],int  deposit[]){
		balance[1]  = balance[1] +deposit[1] ;
	}
	
}  //class 닫음
